﻿using Microsoft.Phone.Controls;

namespace Budgetsch.WP7.View
{
    using System;

    using Budgetsch.WP7.ViewModel.Saving;

    /// <summary>
    /// Description for SavingDetailsView.
    /// </summary>
    public partial class SavingDetailsView
    {
        /// <summary>
        /// Initializes a new instance of the SavingDetailsView class.
        /// </summary>
        public SavingDetailsView()
        {
            InitializeComponent();
        }

        private void AddCommentAppButton_Click(object sender, EventArgs e)
        {
            var vm = DataContext as SavingDetailsViewModel;
            if (vm != null)
            {
                NavigationService.Navigate(new Uri("/View/CommentWriterView.xaml?type=saving&itemid=" + vm.Saving.ID, UriKind.Relative));
            }
        }
    }
}